<?php
namespace catchAdmin\customs\tables;


use catcher\CatchTable;
use catchAdmin\customs\tables\forms\Factory;
use catcher\library\table\Actions;
use catcher\library\table\HeaderItem;
use catcher\library\table\Search;

class Order extends CatchTable
{
    public function table()
    {
        return $this->getTable('order')
                    ->header([
                        HeaderItem::label('')->type('selection'),
                        HeaderItem::label('订单编号')->prop('orderId'),
                        HeaderItem::label('订单日期')->prop('orderDate'),
                        HeaderItem::label('购买人')->prop('contactName'),
                        HeaderItem::label('交易流水号')->prop('payOrderNo'),
                        HeaderItem::label('实付款')->prop('realPayment'),
                        // HeaderItem::label('物流')->prop('logistics_pay_status')->withSwitchComponent(),
                        // HeaderItem::label('支付单')->prop('push_pay_status')->withSwitchComponent(),
                        // HeaderItem::label('订单')->prop('push_order')->withSwitchComponent(),
                        // HeaderItem::label('清单')->prop('push_inventory')->withSwitchComponent(),
                        HeaderItem::label('操作')->width(250)->actions([
                            Actions::declare()
                        ])
                    ])
                    ->withActions([
                      
                    ])
                    ->withSearch([
                        Search::label('订单编号')->text('orderId', '订单编号')
                    ])
                    ->withApiRoute('order/index')
                    ->selectionChange()
                    ->render();
    }


    public function form()
    {
        // TODO: Implement form() method.
        return Factory::create('order');
    }
}